package com.esun.server.controller;

import com.esun.api.interfaces.IOperationLogApi;
import com.esun.api.request.OperationLogRequestDto;

import com.esun.common.response.RestResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.util.List;


/**
 * (OperationLog)控制类
 *
 * @author baron.wubo
 * @date 2021-10-13 13:27:44
 */

@RestController
@RequestMapping("/log/v1/operationLog")
public class OperationLogController implements IOperationLogApi {
    @Resource(name = "OperationLogApi")
    IOperationLogApi operationLogApi;


    @Override
    public RestResponse getOperationLogPostByPage(OperationLogRequestDto requestQo) {
        return operationLogApi.getOperationLogPostByPage(requestQo);
    }

    @Override
    public RestResponse getLogErrorTotal() {
        return operationLogApi.getLogErrorTotal();
    }
    @Override
    public RestResponse addOperationLog(List<OperationLogRequestDto> requestDtoList) {
        return operationLogApi.addOperationLog(requestDtoList);
    }

    @Override
    public RestResponse updateOperationLog(List<OperationLogRequestDto> requestDtoList) {
        return operationLogApi.updateOperationLog(requestDtoList);
    }

    @Override
    public RestResponse deleteOperationLog(List<OperationLogRequestDto> requestDtoList) {
        return operationLogApi.deleteOperationLog(requestDtoList);
    }

    @Override
    public RestResponse importOperationLog(MultipartFile file) {
        return operationLogApi.importOperationLog(file);
    }

    @Override
    public void exportOperationLog(OperationLogRequestDto requestDto) {
        operationLogApi.exportOperationLog(requestDto);
    }

    @Override
    public void downloadTemplate(String path) {
        operationLogApi.downloadTemplate(path);
    }
}
